|
|
|
|
Questions First: 1. Given the date as Date1. Can we write a SELECT statement to find out the number of days in the previous month?
2. Can we create a view before creating the base table? 3. I have table1 and procedure1 in my schema. Procedure1 references table1. What grants shall I give to User1 in order that the User1 be able to execute the procedure? 4. Given the following SQL statement: CREATE SEQUENCE seq1 MINVALUE 1 MAXVALUE 1 INCREMENT BY 1 CYCLE; What Error does this result in? |
|
|
|
|
|
|
|
|
|
|
|
|
|
Now the Answers: 1. SELECT To_Char(Last_Day(To_Date('01'||To_Char(Date1,'MMYYYY'),'DDMMYYYY')-1),'DD')
FROM dual; 2. Yes, using FORCE keyword of CREATE VIEW command 3. I just have to grant EXECUTE privilege on Procedure1. Grants on Table1 are not necessary. Granting Restricted functionality on the tables is one of the important uses of procedures. 4. ORA-04013: Number to CACHE must be less than one cycle |
|
|
|
|